From fe29ad0cc51d5c16199423db5ac7a653cfd3fa46 Mon Sep 17 00:00:00 2001 From: "awilliam@xenbuild2.aw" Date: Thu, 4 Jan 2007 16:22:31 -0700 Subject: [PATCH] [IA64] Fix dom0vp_expose_p2m dom0vp_expose_p2m() assumes that memory is populated non-sparsely. However with dom0 builder modification this assumption is not always true. Make dom0vp_expose_p2m() allow sparsely populated memory. Signed-off-by: Isaku Yamahata --- xen/arch/ia64/xen/mm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xen/arch/ia64/xen/mm.c b/xen/arch/ia64/xen/mm.c index 1effbf9160..b560abf5f8 100644 --- a/xen/arch/ia64/xen/mm.c +++ b/xen/arch/ia64/xen/mm.c @@ -1439,10 +1439,9 @@ dom0vp_expose_p2m(struct domain* d, for (i = 0; i < expose_num_pfn / PTRS_PER_PTE + 1; i++) { assign_pte = lookup_noalloc_domain_pte(d, (assign_start_gpfn + i) << PAGE_SHIFT); - BUG_ON(assign_pte == NULL); - if (pte_present(*assign_pte)) { + if (assign_pte == NULL || pte_present(*assign_pte)) continue; - } + if (expose_p2m_page(d, (assign_start_gpfn + i) << PAGE_SHIFT, p2m_pte_zero_page) < 0) { gdprintk(XENLOG_INFO, "%s failed to assign zero-pte page\n", __func__); -- 2.30.2